<?php

namespace App\Models\Factory;

use App\Helpers\DateUtils;
use App\Helpers\Generator\TokenGenerator;
use App\Helpers\Logger\SLogger;
use App\Helpers\RestResponseFactory;
use App\Helpers\RestUtils;
use App\Helpers\Utils;
use App\Models\AbsModelFactory;
use App\Models\Orm\Thirdapilog;
use App\Strategies\SexStrategy;
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;

/**
 * 三方推送日志工厂
 * Class ThirdapilogFactory
 * @package App\Models\Factory
 */
class ThirdapilogFactory extends AbsModelFactory
{

    /**
     * 创建
     * @param $logdata
     */
    public static function createlog($logdata)
    {
    	return Thirdapilog::insert($logdata);
    }

    public static function UserOnlySuccess($userphone,$type)
    {
        $usersuccess = Thirdapilog::select('*')->where('userphone',$userphone)->where('status',1)->where('type',$type)->get()->toArray();
        return $usersuccess;
    }
}